home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 4 / BBS in a Box - Macintosh - Volume IV (January 1992) (BBS in a Box).iso / Files / Prog / M / MCLUTILS.CPT / oodles-of-utils / brutal-utils / oou-u.lisp / oou-u.lisp
Encoding:
Text File  |  1991-10-24  |  2.1 KB  |  62 lines  |  [TEXT/CCL2]

  1. (in-package :oou)
  2. (provide :oou-u)
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ;; oou-u.Lisp
  5. ;;
  6. ;; Copyright © 1991 Northwestern University Institute for the Learning Sciences
  7. ;; All Rights Reserved
  8. ;;
  9. ;; author: Michael S. Engber
  10. ;;
  11. ;; utilities for oodles-of-utils
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13.  
  14. (export '(compile-oou de-compile-oou
  15.            ))
  16.  
  17. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  18. #|
  19.  
  20. This whole compiling facility need re-writing, perhaps using defsystem.
  21. For now your best off starting with no .fasl's (de-compile-oou removes them)
  22. and then using compile-oou.
  23.  
  24. It slow, it's tedious, but you should only have to do it once.
  25. (till a new version comes out)
  26.  
  27. |#
  28. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  29.  
  30. (defun compile-file-out-of-date (input-pathname &key
  31.                                                 (output-file (merge-pathnames ".fasl" input-pathname))
  32.                                                 (verbose *compile-verbose*)
  33.                                                 (print *compile-print*))
  34.   (when (or (null (probe-file output-file))
  35.             (< (file-write-date output-file) (file-write-date input-pathname)))
  36.     (compile-file input-pathname :output-file output-file :verbose verbose :print print)))
  37.  
  38. (defun compile-oou (&key (verbose *compile-verbose*)
  39.                          (print *compile-print*))
  40.   (dolist (file (oou-source-files))
  41.     (compile-file-out-of-date file :verbose verbose :print print)))
  42.  
  43. (defun load-oou ()
  44.   (dolist (file (oou-source-files))
  45.     (load (make-pathname :name      (pathname-name file)
  46.                          :directory (pathname-directory file))
  47.           :verbose t)))
  48.  
  49. (defun de-compile-oou ()
  50.   (dolist (file (oou-source-files))
  51.     (let ((fasl (merge-pathnames ".fasl" file)))
  52.       (when (and (probe-file fasl) (delete-file fasl))
  53.         (format t "deleted ~s~%" fasl)))))
  54.  
  55. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  56. #|
  57. (compile-oou :verbose t)
  58.  
  59. (de-compile-oou)
  60.  
  61. (load-oou)
  62. |#